{% macro gen_table(users) %}
    <table id="user-info-table" class="table table-bordered table-hover table-condensed table-striped">
        <thead>
            <tr>
                <th>用户ID</th>
                <th>手机号</th>
                <th>昵称</th>
                <th>微信昵称</th>
                <th>成就值</th>
                <th>类型</th>
                <th>省份</th>
                <th>城市</th>
                <th>开通省份</th>
                <th>汇币</th>
                <th>成交次数</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {% for user in users %}
            <tr>
                <td>{{ user.id }}</td>
                <td>{{ user.mobile | encrypt }}</td>
                <td>{{ user.nickname }}</td>
                <td>{{ user.wxuser.nickname }}</td>
                <td>{{ user.credit }}</td>
                <td>{{ user.type_display }}</td>
                <td>{{ user.prov }}</td>
                <td>{{ user.city }}</td>
                <td style="width: 18%">{{ user.attention_areas_display }}</td>
                <td>{{ user.pack.bid_point }}</td>
                <td>{{ user.info_bid_count }}</td>
                <td>
                    <a
                      class="btn btn-xs btn-primary"
                      href="{{url_for('op_bp.user_info', user_id=user.id)}}"
                      name="user-info"
                      target="_blank"
                    >编辑</a><br>
                    <a
                      class="btn btn-xs btn-info" style="margin: 3px;"
                      href="{{url_for('op_bp.user_bid_costs', user_id=user.id)}}"
                      name="user-costs"
                      target="_blank"
                    >消费记录</a>
                </td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
{% endmacro %}
